<div class="grid-100 row">
    <div class="grid-content grid-100">
        <div class="grid-parent grid-100 container">
            <h1 class="section-label pull-left">Inventory Aging Report</h1>
            <hr>
        </div>

        <div class="grid-parent grid-100 container">
            <form novalidate name="handleTheMostForm" ng-submit="handleTheMostForm.$valid && searchReports()">

                <div class="grid-parent grid-100 container">
                    <div class="grid-25">
                        <label>Customer:</label>
                        <organization-auto-complete name="customer" ng-model="search.customerId" tag="Customer" required="true"></organization-auto-complete>
                    </div>
                    <div class="grid-25">
                        <label>Title:</label>
                        <multiple-organization-auto-complete name="title" ng-model="search.titleIds" tag="Title"></multiple-organization-auto-complete>
                    </div>
                    <div class="grid-25">
                        <label>Date From:</label>
                        <lt-date-time value="search.date" date-format="yyyy-mm-dd" min-view="2"  required="true"></lt-date-time>
                    </div>
                    <div class="grid-25">
                        <label>Item:</label>
                        <itemspec-auto-complete name="itemSpec" customer-id="search.customerId" ng-model="search.itemSpecId" allow-clear="true" />
                    </div>
                </div>
                <div class="grid-parent grid-100 container">
                    <div class="grid-25">
                        <label>Receipt ID</label>
                        <lt-tags-input placeholder="Enter Receipt ID" fill="RN-" ng-model="search.receiptIds"></lt-tags-input>
                    </div>
                    <div class="grid-55">&nbsp;</div>
                    <div class="grid-10" style="margin-top: 20px;">
                        <waitting-btn type="button" btn-class="ripplelink" ng-click="export()" value="'Export'"
                            is-loading="exporting"></waitting-btn>
                    </div>
                    <div class="grid-10" style="margin-top: 20px;">
                        <unis-waitting-btn btn-type="submit" btn-class="ripplelink" value="'Search'" is-loading="loading"></unis-waitting-btn>
                    </div>
                </div>

            </form>
        </div>

        <div class=" grid-parent grid-100 container">
            <div class="grid-parent grid-100 container">
                <table class="table">
                    <thead>
                        <tr>
                            <th ng-repeat="head in reportHead"> {{head}} </th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr ng-repeat="report in reportDataView">
                            <td ng-repeat="head in reportHead"> {{report[head]}}</td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
        <div class="grid-parent grid-100 container">
            <unis-pager total-count="reportData.length" page-size="pageSize" load-content="search(currentPage)"></unis-pager>
        </div>
    </div>
</div>